import vue from "vue"
import VueRouter from 'vue-router'
const login = () => import('../views/login/index')
const home = () => import('../views/home/index')
const userList = () => import('../views/userList/index')
const details = () => import('../views/userList/details')
const classify = () => import('../views/classify/index')
const expense = () => import('../views/expense/index')
const materials = () => import('../views/materials/index')
const project = () => import('../views/project/index')
const jobtitle = () => import('../views/jobtitle/index')
const supplier = () => import('../views/supplier/index')
const addSupplier = () => import('../views/supplier/addSupplier')
const subject = () => import('../views/subject/index')
const materialScience = () => import('../views/materialScience/index')
const entry = () => import('../views/entry/index')
vue.use(VueRouter)
const routes = [
    {
        path: "/",
        component: login
    },
    {
        path: "/home",
        component: home,
        redirect: "userList",
        children: [
            {
                path: "/userList",
                component: userList
            },
            {
                path: "/classifyList",
                component: classify
            },
            {
                path: "/expenseList",
                component: expense
            },
            {
                path: "/materialsList",
                component: materials
            }, {
                path: "/projectList",
                component: project
            },
            {
                path: "/jobtitle",
                component: jobtitle
            },
            {
                path: "/supplier",
                component: supplier
            },
            {
                path: "/addSupplier",
                component: addSupplier
            },
            {
                path: "/details",
                component: details
            }, {
                path: '/subject',
                component: subject
            },
            {
                path: '/materialScience',
                component: materialScience
            },
            {
                path: '/entry',
                component: entry
            },

        ]
    }
]
const router = new VueRouter({
    routes,
    model: "history"
})
export default router